
document.addEventListener('DOMContentLoaded', () => {
    const tableContainer = document.getElementById('multiplicationTable');

    for (let i = 1; i <= 9; i++) {
        const row = document.createElement('div');
        row.classList.add('row');

        for (let j = 1; j <= i; j++) {
            const cell = document.createElement('div');
            cell.classList.add('cell');
            cell.textContent = `${i} × ${j} = ${i * j}`;
            row.appendChild(cell);
        }

        tableContainer.appendChild(row);
    }
});